<script>
export default {
	globalData: {
		statusBarHeight: 0,
		navHeight: 0,
		height: 0
	},
	onLaunch() {
		// #ifdef MP-WEIXIN
		wx.getSystemInfo({
			success: (res) => {
				// 状态栏高度
				let statusBarHeight = res.statusBarHeight;
				// 获取胶囊信息
				let menuButtonObject = wx.getMenuButtonBoundingClientRect();
				let navTop = menuButtonObject.top; //胶囊距离顶部距离
				let navHeight = statusBarHeight + menuButtonObject.height + (menuButtonObject.top - statusBarHeight) * 2 + 'px';
				this.globalData.navHeight = navHeight; //导航栏总体高度
				this.globalData.statusBarHeight = statusBarHeight + 'px';
				this.globalData.height = menuButtonObject.height + (menuButtonObject.top - statusBarHeight) * 2 + 'px';
			}
		});
		// #endif
	}
};
</script>

<style lang="scss">
/*每个页面公共css */
@import 'uview-ui/index.scss';
@import 'style/base.css';
@import 'style/flex.css';
@import 'style/position.css';
@import 'style/text.css';
@import 'style/font.css';
body {
	background: #fff;
	min-height: calc(100vh - var(--window-bottom) - var(--window-top));
}
// .header_bg {
// 	background-image: url("https://ant-quanshi.oss-cn-hangzhou.aliyuncs.com/bg.png");
// 	background-size: cover;
// }
</style>
